import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

export function create(data){
  return request({
    url: '/api/user',
    method: 'post',
    data
  })
}

export function update(data){
  return request({
    url: '/api/user',
    method: 'put',
    data
  })
}

export function remove(data){
  return request({
    url: '/api/user/'+data,
    method: 'delete'
  })
}

export function getList(){
  return request({
    url: '/api/user',
    method: 'get'
  })
}

export function get(params){
  return request({
    url: '/api/user/'+params,
    method: 'get'
  })
}

export function getMembers(){
  return request({
    url: '/api/member',
    method: 'get'
  })
}